import axios from '@/api/fetch';
//import * as types from './types';
import SERVER from '@/api/server';
//索赔结算单
//结算单状态
export const getPartType = (params) => axios.get(`${SERVER.CLAIMDEALER}/const/getBaseDataByType`, { params });
//*********************************新增*********************************//

//字典
export const getCodeType = (params) => axios.get(`${SERVER.CLAIMDEALER}/const/getBaseDataByType`, { params });

//结算单检索
export const getInvoiceAuditInfo = params => axios.post(`${SERVER.CLAIMFAC}/rpClaim/partInvoiceSubmitAudit/queryPartInvoiceAuditInfo`, params);
//导出
export const exporturl = (params) => axios.post(`${SERVER.CLAIMFAC}/rpClaim/partInvoiceSubmitAudit/getListForExport`, params, {
  responseType: 'blob'
});

//查询审核历史
export const queryAuditHistory = (settleNo, params) => axios.get(`${SERVER.CLAIMFAC}/rpClaim/partInvoiceSubmitAudit/getAuditHistory/${settleNo}`, { params });


//审核状态变更
export const auditInvoiceResult = (params) => axios.post(`${SERVER.CLAIMFAC}/rpClaim/partInvoiceSubmitAudit/audit`,params);


//索赔结算发票提报明细页面
export const queryClaimPageInfoBySettleNo = (no, params) => axios.post(`${SERVER.CLAIMDEALER}/rpClaim/partInvoiceSubmit/queryClaimPageInfo/${no}`, params);

//索赔结算发票提报明细页面
export const queryClaimInvoiceInfoBySettleNo = (no, params) => axios.post(`${SERVER.CLAIMDEALER}/rpClaim/partInvoiceSubmit/queryClaimInvoiceInfo/${no}`, params);
//索赔结算发票提报明细页面查询物流信息
export const queryLogisticsInfoBySettleNo = (no, params) => axios.post(`${SERVER.CLAIMDEALER}/rpClaim/partInvoiceSubmit/queryLogisticsInfo/${no}`, params);
//索赔结算发票提报明细开票信息
export const queryInvoiceType = (no, params) => axios.post(`${SERVER.CLAIMDEALER}/rpClaim/partInvoiceSubmit/queryInvoiceTypeInfo/${no}`, params);
//索赔结算发票提报明细页面查询附件信息
export const queryFileInfoBySettleNo = (no, params) => axios.post(`${SERVER.CLAIMDEALER}/rpClaim/partInvoiceSubmit/queryFileInfo/${no}`, params);


//索赔结算发票提报明细页面审核历
export const getAuditHistory = (no, params) => axios.post(`${SERVER.CLAIMDEALER}/rpClaim/partInvoiceSubmit/getAuditHistory/${no}`, params);

//结算单检索
export const queryPartInvoiceSearchInfo = params => axios.post(`${SERVER.CLAIMFAC}/rpClaim/partInvoiceSubmitAudit/queryPartInvoiceSearchInfo`, params);
//导出
export const exportSearchurl = (params) => axios.post(`${SERVER.CLAIMFAC}/rpClaim/partInvoiceSubmitAudit/getSearchListForExport`, params, {
  responseType: 'blob'
});

//PDI&首保车辆明细下发
export const batchIssueDetail = params => axios.post(`${SERVER.CLAIMFAC}/rpClaim/partInvoiceSubmitAudit/batchIssue`);
